import purchaseApi from '@/api/declaration/erp/purchaseApi'
import httpRequest from '@/config/axios/httpRequest'
import {
  ErpPurchaseSummaryModel,
  ErpPurchaseTimeSummaryModel
} from '@/models/erp/ErpPurchaseSummaryModel'

// ERP 采购统计 API
export const PurchaseStatisticsApi = {
  // 获得采购统计
  getPurchaseSummary: async () => {
    return await httpRequest.get<ErpPurchaseSummaryModel>(purchaseApi.GetPurchaseSummary)
  },

  // 获得采购时间段统计
  getPurchaseTimeSummary: async () => {
    return await httpRequest.get<ErpPurchaseTimeSummaryModel>(purchaseApi.GetPurchaseTimeSummary)
  }
}
